package cn.yesway.service;

import java.util.Date;
import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;

import cn.yesway.entity.AcctUser;

public interface AcctUserService {
	public abstract AcctUser getUserById(Long userId);

	public abstract AcctUser findByLoginName(String loginName);
	
	public abstract AcctUser findByLoginNameIgnoreCase(String loginName);

	public abstract AcctUser findByLoginNameAndPassword(String loginName, String password);

	public abstract List<AcctUser> findByLoginNameOrEmail(String loginName, String email);

	public abstract List<AcctUser> findByEmailOrderByLoginNameAsc(String email);
	
	public abstract AcctUser findFirstByEmailOrderByLoginNameAsc(String email);
	
	public abstract List<AcctUser> findByEmail(String email, Sort sort);
	
	public abstract List<AcctUser> findDistinctByEmail(String email);
	
	public abstract Page<AcctUser> findByEmail(String email, Pageable pageable);
	
	public abstract Page<AcctUser> findAll(Pageable pageable);
	
	public abstract List<AcctUser> findAll(Sort sort);

	public abstract Long countByEmail(String email);

	public abstract void saveUser(AcctUser acctUser);

	public abstract int updateLoginTime(long acctUserId, Date loginTime);

	public abstract int deleteByIds(List<Long> ids);

	public abstract Long deleteByEmail(String email);

	public abstract List<AcctUser> removeByEmail(String email);
}
